package com.tian.prototype;

/**
 * @author tiansongtao, Email:tiansongtao@up366.com
 * @date 2020/12/28 11:40
 */
public class PrototypeEmail implements Cloneable{

    //基础数据类型
    private String createName;

    //引用数据类型
    EmailUser user;
    EmailUserOne oneUser;

    @Override
    protected PrototypeEmail clone()   {
        PrototypeEmail email = null;
        try {
            email = (PrototypeEmail)super.clone();
            email.oneUser =  oneUser.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return email;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public EmailUser getUser() {
        return user;
    }

    public void setUser(EmailUser user) {
        this.user = user;
    }

    public EmailUserOne getOneUser() {
        return oneUser;
    }

    public void setOneUser(EmailUserOne oneUser) {
        this.oneUser = oneUser;
    }

    @Override
    public String toString() {
        return "PrototypeEmail{" +
                "createName='" + createName + '\'' +
                ", user=" + user +
                ", oneUser=" + oneUser +
                '}';
    }
}
